import request from "@/utils/request";

// 学员列表查询
export const queryStudentPageApi = (name, degree, clazzId, page, pageSize) => {
  return request.get(
    `/students?name=${name}&degree=${degree}&clazzId=${clazzId}&page=${page}&pageSize=${pageSize}`
  );
};

// 根据ID查询
export const queryStudentByIdApi = (id) => {
  return request.get(`/students/${id}`);
};

// 添加学员
export const addStudentApi = (data) => {
  return request.post("/students", data);
};

// 删除学员
export const deleteStudentApi = (ids) => {
  return request.delete(`/students/${ids}`)
}

// 修改学员
export const updateStudentsApi = (data) => {
  return request.put("/students", data)
}

// 违纪处理
export const violationStudentsApi = (id, score) => {
  return request.put(`/students/violation/${id}/${score}`)
}

